package de.koller.eccentricity.render.util;

import de.koller.aframe.util.math.FunctionPreview;
import de.koller.aframe.util.math.IFunction;
import de.koller.oceanFramework.gl.util.RasterManager;

public class Glow {
	
	private Glow() {}
	
	public static void apply( RasterManager m ) {
		throw new UnsupportedOperationException();
	}
	
	private static class GlowFunction implements IFunction {
		private final float k;
		private final float t;
		private final float u;

		public GlowFunction( float t, float k, float u ) {
			this.t = t;
			this.k = k;
			this.u = u;
		}
		
		@Override public float getValue( float x ) {
			return (float)Math.pow( Math.E, -(x+t)/k ) * u;
		}	
	}
	
	public static void main( String[] args ) {
		FunctionPreview.showFunction( -1, 32, new GlowFunction( .1f, 2, 0xff ) );
	}
	
}
